Structure of higher-order interactions in social-ecological networks through Q-analysis of their neighbourhood and clique complex

This paper studies higher-order interactions in social-ecological networks, which formally represent interactions within the social and ecological units of an ecosystem. Many real-world social ecosystems exhibit not only pairwise interactions but also higher-order interactions among their units. Therefore, the conventional graph-theoretic description of networks falls short of capturing these higher-order interactions due to the inherent limitations of the graph definition. In this work, a mathematical framework for capturing the higher-order interactions of a social-ecological system has been given by incorporating notions from combinatorial algebraic topology. In order to achieve this, two different simplicial complexes, the clique and the neighbourhood complex, have been constructed from a pairwise social-ecological network. As a case study, the Q-analysis and a structural study of the interactions in the rural agricultural system of southern Madagascar have been done at various structural levels denoted by q. The results obtained by calculating all the structural vectors for both simplicial complexes, along with exciting results about the participation of facets of the clique complex at different q-levels, have been discussed. This work also establishes significant theorems concerning the dimension of the neighbourhood complex and clique complex obtained from the parent pairwise network.


Introduction
A social-ecological system (SES) is a complex adaptive system [1][2][3].Understanding the intricate interplay between social systems and ecological units lies at the core of comprehending the evolution of social ecological systems.The nexus between these two domains hinges on the quantification of information exchange, a pivotal step towards unraveling their interdependency.In every such system, there are corresponding social-ecological networks (SEN) that transform interactions within the system into a mathematical format, thereby creating a formal representation of the intricate social-ecological structure [4][5][6][7][8].
SES contains interactions between social units (social actors) and ecological units.Most of the SENs proposed in the scholarship are based on the graph theoretic framework, which has provided very important foundational results in the study of SEN when pairwise interactions are considered.It has deep implications for the structural description of the corresponding SES, but exhibits limitations in capturing the complexity of these systems [9][10][11][12][13][14].In the present paper, we build on this framework to include non-pairwise higher-order interactions (HoIs) of the SES using concepts from combinatorial algebraic topology to encode higherorder interactions present in the SES as simplices in the corresponding higher-order SEN.It may be noted that it includes the graph theoretic framework and goes beyond it to describe the non-pairwise HoIs in the SES when the group size of the interaction is more than two [15,16].We hope that our studies complement the existing studies of the structure of SEN.
As many real-life social-ecological networks exhibit higher-order interactions (HoIs), for example, the dependency of humans on forest lands leads to many complex relations between social and ecological units that are not limited to pairwise.In the context of the interaction between two social units, denoted as S1 and S2, and an ecological unit, E1, when both S1 and S2 utilise the same ecological patch, it establishes a social connection between them.Consequently, the entities S1, S2, and E1 engage in a higher-order interaction, reflecting the interplay of social and ecological elements.However, when this interaction is represented using a graphtheoretic model, certain information may be lost.The graph-theoretic model interprets the interaction as separate edges, namely {S1, S2}, {E1, S1}, and {E1, S2}.This representation fails to capture the higher-order nature of the interaction, resulting in information loss.These HoIs cannot be captured by the graph-theoretic based framework due to the definition of graphs.For a given graph-theoretic network G, defined on the vertices set V, E is the set of edges such that E � [V] 2 , where [V] 2 is the set containing those elements of PðVÞ, whose cardinality is 2 [17].Hence, any interaction which involves more than two units cannot be captured by G.Moreover, recognising and appreciating higher-order interactions is critical for knowing the resilience, stability, and functioning of social ecological systems, as well as for designing effective management and conservation methods.In this work, to capture these interactions along with the pairwise ones for understanding the structural details, a mathematical tool from algebraic topology called simplicial complex has been used for the modeling of SES.A simplicial complex K is a collection of simplices (which represent the interactions of the given system) along with the downward closure property [18,19].If the simplicial complex K is defined on a vertex set V, then the subsets of V are the simplices of K.These simplices represents the interaction present in the system, such as 1-simplices represent the edges or the interactions between two units, 2-simplices represents the triangles or the interactions between three units of the system etc.Hence, we can conclude that graph-theoretic networks has the 1-simplices only which are edges.
A given pairwise network can be reconstructed into the simplicial complex in order to capture both lower-order and higher-order interactions.Simplicial complexes which can capture the non-pairwise interactions, can also be built directly from available data, or they can be built in a variety of ways from given undirected or directed networks (digraphs).In this work, we have constructed two abstract simplicial complexes from the available pairwise network: the neighbourhood complex and the clique complex.In the clique complex of any given graph G, the vertices of the complex are the same as the vertices of G, with the complete subgraphs (cliques) as simplices.Whereas in a neighbourhood complex, corresponding to every vertex v of G, there exists a simplex σ(v) in N(G), which consists of the adjacent vertices of v.An example of both the simplicial complexes from the given graph S 5 is presented in Fig 1 .The star graph on 5 vertices, contains 4 vertices with degree 1 and 1 vertex with degree 4. The corresponding neighbourhood complex contains one simplex of dimension 3 and four simplices of dimension 0, whereas clique complex is same as S 5 .
The real-life social-ecological system, which is a rural-agricultural system from southern Madagascar N M has been studied by constructing its clique and neighbourhood complex from the available pairwise network.It has been adopted from the article [4], which contains 14 ecological units that are the forest patches and 8 social units that are the clans that utilise and maintain the ecological patches.The pairwise network contains the interactions between social-social units, ecological-ecological units, and social-ecological units.If two social units utilizing same forest patch then they are said to be socially connected, whereas two ecological units are related by the relation of seed-dispersal.If a clan (social unit) utilise the forest patch (ecological unit) by any means, then they are called related to each other.In order to construct a clique complex C(N M ) from pairwise network N M , an overarching relation R is required by which a group interaction between the units of SES can be defined.If the size of these group interactions are more than 2, we will consider them as HoIs otherwise these interactions will be considered as lower-order interactions.The overarching relation which form the simplices is: generating and managing ecological resources in the same forest patch.The proposed relation R involves relationships that encompass social-social, social-ecological, and ecologicalecological interactions.Consequently, an assemblage of social and ecological entities can collectively embody a Higher-order Interaction (HoI) through the utilisation of the overarching relation R.
The neighbourhood complex N(N M ) consist simplices σ i corresponding to each vertex i of N M .Each simplex can be seen as σ i = {V 1 , . .., V k }, where k is the degree of vertex i in N M and V i 's are the ecological or social units.Moreover, to better understand the structural details and topological features of the given system, Q-analysis of both the constructed simplicial complexes has also been done.Q-analysis was first used by Atkin for the study of social systems, Q-analysis of any simplicial complex allows us to study at the local, meso-scopic, as well as global levels by calculating all three structural vectors [20][21][22][23].It is a hierarchical study in which a complex K can be studied at different connectivity levels denoted by q, where 0 � q � dim(K).At each connectivity level, simplices of dimension greater than or equal to q of complex K have been checked for q-nearness and q-connected components.As these simplices represent the interactions in the Madagascar system, they reveal interesting structural patterns of system.Q-analysis of the studied network reveals structural details about the higher-order interactions between the social actors and forest patches, which are interdependent on each other.
All three structural vectors of the constructed simplicial complexes have been calculated and discussed, which allows us to understand the structural differences in both complexes.For both the complexes, facets and their corresponding q-connected components at each q-level are given by an important result that is established in theorem 3.5.Along with this Simmelian brokerage and the topological dimension of every 0-simplex (vertices) has also been calculated.Simmelian brokerage allows us to estimate the social-ecological capital of each vertex in N M .Whereas the topological dimension of each 0-simplex v i gives us the number of simplices in a simplicial complex that have the 0-simplex v i as a face.Hence, both simmelian brokerage and topological dimension gave us the influential 0-simplices of a simplicial complex, and the important social and ecological units can be identified.
The contribution of this article is as follows: (1) Study of higher-order interactions in a social-ecological network by constructing its clique and neighbourhood complex; (2) Q-analysis of the two constructed simplicial complexes reveals deeper structural patterns of HoIs in the Madagascar social-ecological network.Moreover, using the structural vectors, the formation of HoIs and their connectivity at different q-levels were also analysed; and (3) Developed theorems in section 4.1, which establish a relationship between the dimension of the neighbourhood complex and the clique complex constructed from a pairwise network.Moreover, the objective of this work is to study the structural participation of simplices in any given specific social-ecological network, while the background of the work shall be entirely combinatorial.
The paper is organised as follows: Section 2 provides some standard definitions in combinatorial algebraic topology to make the article self-contained.Section 3 illustrates the construction of clique and neighbourhood complexes along with important theorems related to the dimension of complexes that have been developed in this work.In Section 4, we have discussed the Q-analysis of the neighbourhood complex of the Madagascar network.Important results and calculations have been discussed in Section 5, and Section 6 briefly concludes the work.

Preliminaries
This section provides some standard definitions in combinatorial algebraic topology, to make the article self-contained.Most of the definitions presented in this section can be found in the literature [24][25][26][27][28][29].

Notations
Throughout this work N M represents the social-ecological network of southern Madagascar, C(G) is the clique complex of the graph G and N(G) is the neighbourhood complex of graph G, otherwise stated.
Definition 1 Let V be a non-empty, finite set with jVj ¼ n þ 1; n 2 N whose elements are the vertices, and are denoted by v i , i = 0, 1, . .., n.Any member of the power set of V, PðVÞ, is an abstract combinatorial object called a simplex over V. Definition 2 Given a set V as in the previous definition, a family K of simplices is called a simplicial complex if it is closed under subset inclusion, that is: 8s i 2 K and ðs j 2 PðVÞ; if s j � s i ) s j 2 KÞ: By the above condition vertex set of simplicial complex K can be written as V(K) = {v 2 V| {v} 2 K}.Moreover, taking a subset of simplices of K, with the subset inclusion property is called subcomplex of the simplicial complex K. Definition 3 Given a simplicial complex K, the elements of K are called simplices and the dimension of any simplex σ 2 K, dim(σ) is defined as dim(σ) = |σ| − 1.
Definition 4 The dimension of a simplicial complex K, denoted by dim(K), is defined to be r � 0 where r is the largest natural number such that K contains an r-simplex (that is simplex of dimension r).
A simplicial complex of dimension L contains simplices of every dimension starting with 0 to L. Each simplex σ 2 K represents the interaction of order |σ| − 1, interactions are classified as higher-order if |σ| � 3 and as lower-order if |σ| � 2. This makes the simplicial complex a suitable mathematical object for capturing the interactions of a given complex system.Among the simplices of a simplicial complex, the maximal simplices play a very relevant role, and the sequence of maximal simplices can fully determine the simplicial complex [30].
Definition 5 In a simplicial complex K, for a given p 2 N, a collection of simplices of dimension atmost p is called p-skeleton of K.
In a simplicial complex K, we can always construct a subset of simplices K p = {σ 2 K|dim(σ) � p} of dimension up to p, where p � dim(K).This allows us to see a graph-theoretic network as 1-skeleton of any simplicial complex.From the given simplicial complex, one can construct a collection of all simplices of dimension atmost 1, which is the collection of all vertices and edges only.This collection of simplices will be a sub complex of dimension 1 and contain only the interactions of order 1.Hence, for a given SES, a definition using the simplicial complex that can capture the HoIs along with the pairwise interactions is given as: Definition 6 A social-ecological network (SEN) is a combinatorial object and its structure is given by M SES = (K, ^) along with an algorithm A such that for ^6 ¼ ϕ, α 2 ^� N þ , K is a simplicial complex over V, the universe of an SES, with dim(K) � 1 given by the algorithm A(α).
On putting α = 1, the algorithm A will capture only interactions of order 1, which are the pairwise interactions.Hence, by varying value of α one can capture the interactions of various orders present in the SES.Simplices of dimension two or more represent the higher-order interactions of the system, whereas simplices of dimension less than two represent the lowerorder interactions.Moreover, simplices of every dimension share faces with each other, and the dimension of shared faces among the simplices is called the strength of connectivity.If two simplices share a face of dimension m, then their connectivity strength is m.More the dimension of shared faces, more the strength of connectivity.
Definition 7 In a simplicial complex K of dimension k, connectivity level q is defined as the strength of connectivity among the simplices of dimension q or more.
Due to the subset closure property, any subsimplex of a simplex is also a simplex induces various levels of adjacency as well as various levels of connectivity between the simplices.These connectivity levels are denoted by q and 0 � q � dim(K).At every q-level, simplices of dimension q or more are checked for their q-nearness and q-connectedness.Hence, q-level refers to the strength of connectivity among the simplices of dimension q or more.At each qlevel, strength of connectivity of two connected simplices is q, as they share a q-dimensional face with each other.In the next definition, we will see when the two simplices are q-near to each other.Definition 8 Two simplices σ i and σ j of a simplicial complex K are q-near if they share a qdimensional face and hence, they are also (q − 1), (q − 2), . .., 1 and 0-near.
The q-nearness of two simplices can be used to construct a sequence of simplices in which consecutive simplices are q-near to each other.Moreover, two simplices σ i and σ j (σ i 6 ¼ σ j ) are said to be q-connected if there exists a sequence of simplices starting with σ i and ending at σ j , such that any two consecutive simplices are q-near.If, two simplices are q-connected then they will also (q − 1)−, (q − 2)−, . .., (0)− connected.A collection of such simplices of any simplicial complex K that are q-connected to each other is called a q-connected component of K. Hence, a simplicial complex can be divided into q-connected components.
From the combinatorial aspect three structure vectors of the simplicial complex K of dimension k are defined: • The first structure vector Q q : The q th entry of the Q-vector of dimension k + 1 denoted by Q q is equal to the number of q-connected components.This vector provides information on the number of connected components at each level of connectivity with initial level being equal to the dimension of the complex: • The second structure vector n q is an integer vector with dim(K)+ 1, is given as n q = {n q=k n q=k−1 . . .n q=1 n q=0 }; where the q th entry, n q , is equal to the number of simplices with dimension larger or equal to q, that is, it is equal to the number of simplices at the q-level.
• The third structure vector � Q q is the simplicial complex's global characteristic that assesses the degree of connectedness on a q-level.In other words, it counts the number of q-connected components per the number of simplices, with � Q q components defined as:

Materials and methods
In this work, a rural agricultural system in southern Madagascar is described as a social-ecological network represented by N M .It consists of 14 ecological units, which are forest patches, and 8 clans, which maintain the forest patches and constitute the social units [32][33][34].The relationship that defined the edges along with the simplices in this network is "generating and managing ecological resources in the same forest patch", with the help of this relation higherorder interactions have been defined in N M .For the structural analysis of this social-ecological network, the clique complex and neighbourhood complex have been constructed.Rural agricultural system and its pairwise network representation has been given in On the one hand, the neighbourhood complex of the network N M is denoted by N(N M ) consists of 22 simplices corresponding to every vertex v of N M , which are defined by the adjacent vertices of v.Each simplex in N(N M ) is denoted by σ(v i ), corresponding to the vertex v i for i = {1, . .., 22} (initial 14 vertices are ecological units, which are represented by Ei and the remaining are social units, represented by Si).Hence, the structure of neighbourhood complex is given as, N(N M ) = {σ(v 1 ), σ(v 2 ), . .., σ(v 22 )}, along with their subsets.For example, σ(v 1 ) = {E2, S1, S2, S5} is a simplex corresponding to vertex v 1 which is an ecological unit E1, adjacent with four vertices from the vertex set of N M .Similarly, all the 22 simplices have been defined.On the other hand, the clique complex of the network N M is denoted by C(N M ) and consist of all the complete subgraphs of N M .It further implies that all the complete subgraphs of size n of N M will become simplex of dimension n − 1 in C(N M ).

Clique complex and neighbourhood complex of a graph
For capturing the non-pairwise interactions of a given network N, using a simplicial complex, mainly two combinatorial approaches are defined in the literature [35][36][37][38].One is a clique complex, and the second is a neighbourhood complex.Both of these simplicial complexes can be constructed by a given pairwise network N. The clique complex contains the complete subgraphs of N as simplices, while the neighbourhood complex contains the simplices as a subset of vertices of N that have a common neighbour.In other words, the clique complex captures the global connectivity of the network, while the neighbourhood complex captures the local connectivity of the vertices of N.Both of these simplicial complexes contain simplices, which represent the interactions of both types (higher-order and lower-order) in the original network N that cannot be captured by the graph-theoretic network N. So, we can get two different simplicial complexes from the given network N, which capture the different structural properties of this network.Additionally, they both provide a way to encode the connectivity structure of a given graph into a combinatorial object that can be analysed using topological methods.
Definition 9 Clique complex C(G) of a graph G defined on a vertex set V is the simplicial complex whose simplices are all subsets of the vertices that form a clique in the graph.
Definition 10 Neighbourhood complex N(G) of a graph G defined on a vertex set V is the simplicial complex whose simplices are subsets of the vertex set which have the common neighbour in the original graph G.
A k-dimensional simplex in N(G) is a set of k + 1 vertices that have a common neighbour in G, which can reveal information about the clustering of vertices in G. Additionally, the neighbourhood complex contains simplices of dimension deg(v i ) − 1 for each v i 2 V where i 2 [1, . .., n].It encodes the pairwise relationships among vertices as well as the higher-order relationships among subsets of vertices of G. Table 1 signifies that depending upon the parent graph, the dimension of clique and neighbourhood complex can vary, which further defines the dimension of structural vectors.So a classification based on the graph type (complete or not complete) is given in the next two theorems, which helps us understand the dimension of structural vectors better.We have classified the parent graph as complete or non-complete, and based on this, the q-connectivity of corresponding simplicial complexes can be studied.
Theorem 2.1 Dimension of neighbourhood complex N(K n ) corresponding to complete graphs K n is always less than the dimension of clique complex C(K n ).
Proof.Let K n be a complete graph on n vertices.Then dimension of C(K n ) = n − 1, as every clique of size of n is a (n − 1)-simplex in its corresponding clique complex.Now, in K n degree of each vertex is n − 1, which further implies that set of these n − 1 vertices will form a (n − 2)simplex in the neighbourhood complex N(K n ).
Let assume that the dimension of neighbourhood complex ) All the vertices of σ have a common neighbour in the original graph K n , let say v.These n vertices together with v belong to K n which is a contradiction.Hence, dimension of N(K n ) is always less than dimension of N(K n ).
Theorem 2.2 For a given non-empty connected graph G defined on vertex set V of cardinality n, if G 6 ¼ K n then dimension of clique complex cannot be greater than dimension of neighbourhood complex.
Proof.Let assume the highest degree vertex in G is v with degree k.These k-vertices will be (k − 1)-simplex in corresponding neighbourhood complex N(G) and dim(N(G)) = k − 1.
Let, dim(C(G)) > dim(N(G)) and dim(C(G)) = k ) 9 a clique c of size k + 1 in G and every vertex of this clique have degree exactly k.Here two conditions arise: • Either clique c is isolated from remaining graph.
• Or the given graph G is a complete graph on k + 1 vertices.
In both the conditions contradiction will arise.Hence, dimension of clique complex cannot be greater than dimension of neighbourhood complex.
Facets of a simplicial complex are the maximal simplices, and the study of facets can give us deeper insights into the simplicial complex.In the q-analysis of clique and neighbourhood complex, the study of their facets can give us groups of social-ecological units that have special kinds of interactions with in the system.Moreover, the q-connectivity of these simplices is also different from the other simplices.In the next theorem, we can see how facets of a clique and neighbourhood complex participate in the q-connectivity of the complex.
Theorem 2.3 In a simplicial complex Δ of dimension K, every facet of Δ contributed as a individual q-connected component at q = dim(facet)-level.
Proof.Let σ be a facet of dimension k, where 0 � k � K. Let assume σ does not contribute as a individual q-connected component at the q th -level, where q = dim(σ) = k.At q = k level the dimension of all the simplices are greater than or equal to k.Which implies that 9 at least a simplex τ other than σ which is k-near with σ.This further implies that σ � τ.Which is a contradiction.

Simmelian brokerage and topological dimension
In social ecological networks interactions of social and ecological units can be used to interpretate the meaning of social-ecological capital.In order to estimate the social-ecological capital of vertices (ecological and social units) in the network, Simmelian brokerage B i for each 0-simplex i = {1, 2, . .., 22} has been calculated.According to [31], for a given 0-simplex i, simmelian brokerage "captures opportunities of brokerage amongst otherwise disconnected cohesive groups of contacts".Quantitatively, B i is determined by the vertex's efficiency E i , For a given vertex i which has the neighbours count n i in the considered group of neighbours N i is given by: where E i is given by Here, d mn is the shortest path distance between vertex m and n by omitting the vertex i.
Topological dimension of every 0-simplex in a simplicial complex K is given by the total number of simplices in which 0-simplex participates.For expressing this, a vector of dimension equal to the dim(K)+1 denoted by Q i q has been introduced for every 0-simplex i of the given simplicial complex K [39].Every component of the node's vector Q i q gives the number of simplices of dimension q, in which 0-simplex i participates.The summation of every component of vector Q i q gives us the topological dimension of 0-simplex i.For example, node's vector corresponding to the 0-simplex E1 is given by Q E1 q ¼ ½0 3 4 1�.Hence, the topological dimension of E1 is 0 + 3 + 4 + 1 = 8.
In the Fig 3 .it can be observed that for the 0-simplex S3 the value of simmelian brokerage is highest which is 5.95.The corresponding topological dimension of vertex S3 can be calculated by its node's vector which is given as Q S3 q ¼ ½5 17 12 1�, 5+17+12+1 = 35.It signifies that the vertex S3 has the highest social-ecological capital, which further suggest that vertex S3 can be act as broker in communities.Among the ecological units E3 has the highest value of topological dimension, and it can be concluded that E3 participated in the highest number of simplices formed in the clique complex of C(N M ).

Analysis of q-nearness in clique complex C(N M )
In the Q-analysis, a simplicial complex K is studied at different connectivity levels, designated by q and it varies from 0 � q � dim(K).At these different connectivity levels, we can understand the formation of higher-order interactions in any given system represented by a simplicial complex.The dimension of the constructed clique complex C(N M ) of the Madagascar system is 3, hence one can study the structural details of the Madagascar system for different values of q, where 0 � q � 3. 0-nearness: Two given simplices are said to be 0-near if they share a common 0-dimensional face.Hence, one of the simplex must have dimension greater than 0. If the dimension of both the simplices are one, then it is the same as the graph-theoretic adjacency (two edges are adjacent if they share a common vertex).By the first and second structural vectors given in Table 2, the components corresponding to the q = 0 are 1 and 121 respectively.Which implies Table 2. Table showing the q-analysis of the simplicial complex (neighbourhood complex).The first column is the different connectivity levels of the complex.The second column is the number of q-connected components at each level, while the third column reports the names of the simplices making up each q-connected component.that all the simplices of dimension 0 or more (which are 121 in counting) are in single 0-connected component.Which further suggests that at q = 0 level structure is the same as a graphtheoretic network, as the connectivity is only depending upon the sharing of 0-dimensional simplex which is a vertex.

1-nearness:
If the dimensions of the two simplices are at least 1, then we can discuss their 1-nearness.By the first and second structural vectors given in Table 2, the components corresponding to the q = 1 are Q 1 = 5 and n 1 = 99 respectively, Q 1 denotes the number of 1-connected components at this level.Out of these five 1-connected components, 3 are facets of dimension 1, which contribute as individual components at the q = 1 level, according to Theorem 3.5.Remaining non-facets simplices of dimension 1 can be 1-near with simplices of dimension 2 and 3, and always form an interaction type of triangle or tetrahedral as for 1-nearness, it should be contained in the simplices of a higher dimension.These interactions can be studied at the q = 2 or 3 level (as these 1-simplices must be the face of any 2-simplex or 3-simplex).
Simplices of dimension 2 can be 1-near with simplices of dimension 2 and 3. First, we will see the 1-nearness between simplices of dimension 2. After observing most of the patterns, they can be classified into two types: (A) If two social units are utilising more than one same ecological patch, they are considered to be 1-near and can be seen as a part of "1-connected component." (B) Higher-order interactions of order 2 between ecological units are also part of the 1-connected component.
In Fig 4a, it can be seen that social units S7 and S8 are utilising ecological patches E12 and E11, due to which S7 and S8 are socially connected; hence, these two higher-order interactions {S7, S8, E12} and {S7, S8, E11} are 1-near to each other.On the other hand, higher-order interactions between ecological units represented by simplices {E6, E7, E3} and {E4, E7, E3} are also 1-near to each other by sharing two common ecological units.
Simplices of dimension 2 can also be 1-near with simplices of dimension 3 by sharing a face of dimension 1.Here, also two different patterns are observed, either the simplex of dimension 2 is contained in the simplex of dimension 3, or it will share only one dimensional face with the 3-simplex.In the second case, the 2-simplex will be the facet of the simplicial complex (as A simplex of dimension 2 can be 2-near with a simplex of dimension 3, if it is a face of the dimension 3 simplex.By which we can directly conclude that facets of dimension 2 cannot be 2-near in the C(N M ) as they cannot be a face of any other bigger simplex.Hence, these interactions of order 2 represented by facets are individual 2-connected components at q = 2 level.2-nearness can also be defined between simplices of dimension 3. It will be formed by simplices of dimension 3, which share only a 2-dimensional face.An example of this type of interaction is given in Fig 6.

Q-analysis of neighbourhood complex of Madagascar network
In this section, we have constructed two neighbourhood complexes from the pairwise network of Madagascar N M .One corresponds to the social units of N M , which is denoted by N S (N M ), and the other one corresponds to the ecological units of N M , which is denoted by N E (N M ).

Analysis of q-nearness in neighbourhood complex of social units N S (N M )
The neighbourhood complex of the given Madagascar network N M has been constructed for social units and it contains the simplices corresponding to social units only.Each social unit, Si, has been represented as a simplex of the social and ecological units for which Si has been a common neighbour.Corresponding to 8 social units, 8 simplices of different dimensions have been formed and represented by S i .The highest simplex of dimension 11 has been formed corresponding to the social unit S3, which implies that S3 has the highest number of neighbours in the pairwise network of Madagascar and is given in Fig 7 .Every social unit has at least 3 neighbours in the N M , which implies that the minimum dimension of any simplex in a neighbourhood complex is 2. By doing this, simplices that formed corresponding to different social units will reveal the formation of different social ties depending upon the social and ecological units.The neighbourhood complex of of social units N S (N M ), contains simplices corresponding to social units only Si, hence it is a sub complex of the neighbourhood complex N(N M ) given in Fig 8a.
As the structure suggests, S 3 contains 10 different ecological units as their vertices and 2 social units.It implies that S3 is adjacent to 10 ecological and 2 social units.From the ecological point of view, S3 utilises most of the ecological units or patches, and due to this, {S3, S4} and {S3, S5} are socially connected in the original pairwise network N M , as they both also uses the same ecological patches.
The structure of neighbourhood complex can be seen as N S (N M ) = {S 1 , S 2 , . .., S 8 } along with all its faces and the Q-analysis of N S (N M ) has been given in Table 2.At the q = 0 level, all the simplices lie in the single component, which implies that each simplex shares at least one ecological or social unit with any of the simplex.Hence, they are all in the same component and further 0-connected to each other.Simplices S 3 and S 1 share the highest number of socialecological units, which are 3, hence they are 2-connected to each other.No connection of any type has been observed between simplices of dimension greater than 2, which further suggests that connectivity levels greater than 2 contain only singleton components.

Analysis of q-nearness in neighbourhood complex of ecological units N E (N M )
Corresponding to each ecological unit Ei a simplex E i has been constructed by the vertices of N M which have the common neighbour Ei.The largest simplex E 3 is of dimension 6 and its structure is given as E 3 = {E2, E4, E6, E7, S1, S2, S3}, it consist of 4 ecological and 3 social units from pairwise network N M .Simplex E 3 which is a simplex corresponding to the ecological unit E3 also has largest area among all the ecological patches of N M .
The structure of neighbourhood complex of ecological units is given as N S (N M ) = {E 1 , . .., E 14 } along with all its faces and its q-analysis is given in Table 3.At q = 0 and q = 1 level, all the simplices lie in the single component, which implies that all E i s are 1-connected to each other.As value of q are increasing the number of q-connected components are also increasing.At q = 3 level, one can observe the sudden increase in the number of q-connected components, it implies that very few simplices in N E (N M ) sharing more than 3 ecological/social units with each other and participating as individual 3-connected component.Only simplices which form 3-connected component are E 6 and E 4 .On q = 4 onward, no simplex is sharing a face of dimension 4 or more with any other.Highest q-near value in this complex is 3, as E 6 and E 4 are 3-near to each other.
With the help of the q-analysis of the neighbourhood complex of social units and ecological units, one can identify the largest dimensional simplices and their corresponding social and ecological units, which are S3 and E3 respectively.Corresponding to S3 and E3, there exist simplices S 3 and E 3 respectively, which contain their neighbours.Moreover, we can understand the participation of their neighbours in the formation of other simplices at different q-levels.This can be helpful in understanding the interactions of social-ecological units in Madagascar, as the depth of material transfer, intricately linked to the size and proximity of patches to social units, governs the extraction and utilisation of resources, ushering in a nuanced perspective on resource dynamics.The gamut of resource utilisation, spanning cattle herding, timber harvesting for charcoal production and fuel, and agriculture, are the recipient-oriented interactions that maintain the complex yet delicate balance shaping Madagascar's social ecological system as investigated in the present study [40].The ecological unit E3, which has the highest number of connections among the ecological units, can be treated as a source of resources.

Results and calculations
In this section, all the results obtained from the Q-analysis for both simplicial complexes have been discussed.An analysis of all three structural vectors for both the constructed simplicial complexes has also been done.
• The relation between the vertices is: generating and managing ecological resources in the same forest patch.By this relation, two ecological units can be related to each other, whereas two social units can also be related to each other depending on their utilization of the same forest patch.
• The overarching nature of this relationship also involves the social-ecological interactions of the given network.
• Clique complex of the given pairwise network has been constructed by taking cliques of N M as simplices of appropriate order.
Table 3. Table showing the q-analysis of the simplicial complex (neighbourhood complex).The first column is the different connectivity levels of the complex.The second column is the number of q-connected components at each level, while the third column reports the names of the simplices making up each q-connected component.• Neighbourhood complex has been constructed by making simplices corresponding to each vertex by its neighbours.
• The constructed clique complex is of dimension 3, whereas the dimension of neighbourhood complex is 11.Which further implies that clique complex have 4 levels of connectivity whereas neighbourhood complex have 12 levels of connectivity.
• Q-analysis of the clique complex and neighbourhood complex of N M has been done and all the structural vectors have been calculated and given in Table 4.
The first structural vector of clique complex C(N M ) is Q = [7 17 5 1], every entry of this vector can be seen as a sum of two classes one contains the number of connected components without facets and other one which contains the facets of dimension q.For example, Q can be written as Q = [0 + 7 3 + 14 2 + 3 1 + 0], here 7, 14, 3, and 0 are the facets of dimension 3, 2, 1 and 0 respectively of C(N M ).Total facets of N(N M ) are 19 which contribute as individual q-connected component at appropriate q-level.Moreover, every facet of dim � 2 contain one ecological unit and one social unit at least.But there are only three higher-order interactions which contains only ecological units are; {E3, E4, E7}, {E3, E6, E7}, {E10, E13, E14} and all the other higher-order interactions contain one ecological unit and one social unit atleast.Comparison plot of first and second structural vectors are given in Fig 9 .for both the complexes.
The overlap of values in Fig 9 .for some q-levels like 7, 8, 9, 10, and 11 in the neighbourhood complex and for level 3 in the clique complex indicate that at these q-levels, structure is disconnected.
The third structural vector � Q q of C(N M ) increases as q-connected components in Q q decreases, and one can observed that � Q q ! 1 as Q q n q !0. The ratio of Q q n q is signifies the q-connected components per simplex of any simplicial complex, as going on left to right in the calculated structural vectors the ratio tends to zero which signifies the increasing value of � Q q .Moreover, each component of � Q q tells us the percentage of simplices in the simplicial complex which are q-connected.
• In Table 5, simplices with the highest eccentricity values are given for both the constructed simplicial complexes.Simplex S 3 from the neighbourhood complex has the highest value of eccentricity, as it is highest dimensional simplex and participated in the community structures with most of the simplices.

Conclusions
In this work, a structural study of the rural agricultural system of southern Madagascar has been done by constructing clique and neighbourhood complexes from the available pairwise social-ecological network.Using simplicial complex representation of this network, we investigated the in-depth topology of the given Madagascar network N M .With the help of Q-analysis, which gives us an understanding of structure at different topological levels, we gain deeper insights into the structure studied.All three structural vectors, along with the node's vector, which leads us to the topological dimension, have been calculated and compared for both simplicial complexes.Interesting results about the participation of facets of the clique complex at different q-levels have been studied and given by the theorem.Moreover, some interesting results on the dimension of neighbourhood complex and clique complex have been compared on the basis of the graph type from which they originated.An in-depth analysis of q-nearness in clique complexes gave us an idea about how higherorder interactions are sharing social and ecological units in the form of q-faces with each other.This research delves into the intricate fabric of Madagascar's social ecological system, revealing the multifaceted interactions between diverse units that extend beyond mere pairwise associations.Central to this investigation is the concept of information, referring to the resources harnessed by various anthropogenic units from forests and agricultural lands.Employing input-output analysis and ecological network analysis, the flow of materials can be quantified, thus portraying the intricate roles played by different nodes within the social and ecological units.Remarkably, social units emerge as the receivers of resources (sinks), while ecological units act as the sources, manifesting a bidirectional exchange that defies traditional unidirectional energy-flow models.
The concept of 'q-nearness' has illuminated higher-order interactions, showcasing how diverse units-both social and ecological-collaborate and share resources in ways that challenge conventional models of energy flow.Our work also sheds light on the perpetual symbiotic relationship existing between human communities and their natural environment, highlighting the vital bidirectional exchange of resources that defines this dynamic social-ecological landscape.This study contributes to a more holistic comprehension of the intricate web of interactions from a social-ecological perspective, thus providing valuable insights for sustainable practices and future research in both social and ecological domains.
In order to further strengthen our methodology, future works require a more detailed study of the higher-order interactions present in social-ecological networks, corresponding to every possible relationship exists in the social-ecological system.To properly define the simplices of a simplicial complex, a well-defined overarching relation is required, by which the interactions of lower-order as well as higher-order of units can be defined.Analysis of each and every relation in a large clique and neighbourhood complex is not easy as the q-levels will increase, which makes it difficult to understand how social and ecological units are shared among the systems and can be seen as a limitation of this framework.Another opportunity that can strengthen this work is the availability of higher-order data, which will definitely help in the detailed study of the structure of the system, as constructing a simplicial complex from a pairwise network always required an overarching relation to the defined simplices of the system, which is not possible every time.

Fig 4 .
Fig 4. (a) 1-nearness in the simplices of dimension 2 formed by the combination of social and ecological units (b) 1-nearness in the simplices of dimension 2 formed by the ecological units alone.https://doi.org/10.1371/journal.pone.0306409.g004

Table 4 . Different structural vectors of clique complex and neighbourhood complex of N M .
The dimension of all the structural vectors of clique complex is 4, whereas dimension of all the structural vectors of neighbourhood complex is 12.